﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using UIBase;
using MFTool;
using MF_Base.Model;
using System.ComponentModel.Composition;
using System.Linq.Expressions;
using AutoUI.Areas.ConfigUI.Controllers;

namespace AutoUI.Areas.Sys.Controllers
{
    [Export]
    public class ExpressionEditorController : BaseController
    {
        public ActionResult PageView()
        {
            return View();
        }

        public JsonResult GetCtrlList(string uiCode)
        {
            string id = QueryString("formId");
            FormConfig fc = UnitOfWork.Get<FormConfig>().FirstOrDefault(a => a.UICode == uiCode);
            if (fc != null)
            {
                return Json(fc.GetCtrlAttrList());
            }
            return Json("");
        }
    }
}